/*
 * @Author: Sam
 * @Date: 2020-10-19 11:32:14
 * @LastEditTime: 2021-12-07 12:06:30
 * @LastEditors: Sam
 * @Description:
 * @FilePath: \resourcesf:\thework\tofba-client\src\api\myProfile.js
 * @可以输入预定的版权声明、个性签名、空行等
 */
import request from '@/utils/request'

import qs from 'qs'

// 进口商信息
export function customerimporterList (data) {
  console.log('%cdata: ', 'color: MidnightBlue; background: Aquamarine;', data)
  return request({
    url: 'customer/importer/list',
    method: 'post',
    data
  })
}
export function querySkuInfoPage (data) {
  console.log('%cdata: ', 'color: MidnightBlue; background: Aquamarine;', data)
  return request({
    url: 'customer/skuInfos/querySkuInfoPage',
    method: 'post',
    data
  })
}
export function customerimporterSave (data) {
  return request({
    url: 'customer/importer/save',
    method: 'post',
    data
  })
}
export function customerimporterDelete (data) {
  return request({
    url: 'customer/importer/delete',
    method: 'post',
    data
  })
}

// 常用派送地址
export function customerdeliveryaddressList (data) {
  return request({
    url: 'customer/customerdeliveryaddress/list',
    method: 'post',
    data
  })
}
export function customerdeliveryaddressSave (data) {
  return request({
    url: 'customer/customerdeliveryaddress/save',
    method: 'post',
    data
  })
}

export function customerdeliveryaddressDelete (data) {
  return request({
    url: 'customer/customerdeliveryaddress/delete',
    method: 'post',
    data
  })
}

// 客户提货地址信息
export function customerpickupadderssList (data) {
  return request({
    url: 'customer/pickupaddress/list',
    method: 'post',
    data
  })
}
export function customerpickupadderssSave (data) {
  return request({
    url: 'customer/pickupaddress/save',
    method: 'post',
    data
  })
}

export function customerpickupadderssDelete (data) {
  return request({
    url: 'customer/pickupaddress/delete',
    method: 'post',
    data
  })
}

// 客户sku信息
export function customerskuinfoList (data) {
  return request({
    url: 'customer/skuInfos/list',
    method: 'post',
    data
    // headers: {
    //   'Content-Type': 'application/x-www-form-urlencoded'
    // }
  })
}
export function customerskuinfoCount (data) {
  return request({
    url: 'customer/skuInfos/count',
    method: 'post',
    data
  })
}
export function customerskuinfoSave (data) {
  return request({
    url: 'customer/skuInfos/save',
    method: 'post',
    data
  })
}

export function customerskuinfoDelete (data) {
  return request({
    url: 'customer/skuInfos/delete',
    method: 'post',
    data
  })
}
export function uploadSkuImage (data) {
  return request({
    url: '/customer/skuInfos/uploadSkuImage',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 批量上传
export function batchimportcustomersku (data) {
  return request({
    url: 'customer/skuInfos/batchimportcustomersku',
    method: 'post',
    data
  })
}
export function exportSKU (data) {
  return request({
    url: 'customer/skuInfos/exportSKU',
    method: 'post',
    data
  })
}

// export function customerskuinfoFindbyid​(data) {
//   return request({
//     url:  '​/customer​/customerskuinfo​/findbyid',
//     method: 'post',
//     data,
//     headers: {'Content-Type':'application/json'}
//   })
// }

// 发票
export function customerInvoiceList (data) {
  return request({
    url: 'customer/invoice/list',
    method: 'post',
    data
  })
}
export function customerInvoiceDelete (data) {
  return request({
    url: 'customer/invoice/delete',
    method: 'post',
    data
  })
}
export function customerInvoiceSave (data) {
  return request({
    url: 'customer/invoice/save',
    method: 'post',
    data
  })
}

// 发件人

export function customerShipperList (data) {
  return request({
    url: 'customer/shippers/list',
    method: 'post',
    data
  })
}
export function customerShipperDelete (data) {
  return request({
    url: 'customer/shippers/delete',
    method: 'post',
    data
  })
}
export function customerShipperSave (data) {
  return request({
    url: 'customer/shippers/save',
    method: 'post',
    data
  })
}
// 保存
export function customerTrackNoticeEmailSave (data) {
  return request({
    url: 'customer/tracknotice/save',
    method: 'post',
    data
  })
}
// 查询
export function customerTrackNoticeEmailList (data) {
  return request({
    url: 'customer/tracknotice/list',
    method: 'post',
    data
  })
}
// 删除
export function customerTrackNoticeEmailDelete (data) {
  return request({
    url: 'customer/tracknotice/delete',
    method: 'post',
    data
  })
}

// 保存
export function customerFileNoticeEmailSave (data) {
  return request({
    url: 'customer/filenotice/save',
    method: 'post',
    data
  })
}
// 查询
export function customerFileNoticeEmailList (data) {
  return request({
    url: 'customer/filenotice/list',
    method: 'post',
    data
  })
}
// 删除
export function customerFileNoticeEmailDelete (data) {
  return request({
    url: 'customer/filenotice/delete',
    method: 'post',
    data
  })
}
export function getCustomerSalesmanService (data) {
  return request({
    url: 'customer/getCustomerSalesmanService',
    method: 'post',
    data
  })
}

// 店铺的信息同步
export function manualSync (data) {
  return request({
    url: 'seaair/amazon/authorization/manualSync',
    method: 'post',
    data
  })
}
// 店铺的信息 保存
export function saveOrUpdate (data) {
  return request({
    url: 'seaair/amazon/authorization/saveOrUpdate',
    method: 'post',
    data
  })
}
// 店铺的信息同步
export function sotreList (data) {
  return request({
    url: 'seaair/amazon/authorization/list',
    method: 'post',
    data
  })
}
// 店铺的 禁用
export function disable (data) {
  return request({
    url: 'seaair/amazon/authorization/disable',
    method: 'post',
    data
  })
}
// // 店铺的信息同步
// export function manualSync (data) {
//   return request({
//     url: 'seaair/amazon/authorization/manualSync',
//     method: 'post',
//     data
//   })
// }
